package com.itheima.udp;

import java.io.IOException;
import java.net.*;

public class Demo1发送端 {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();

        String s = "www.tokyohot.com";
        byte[] b = s.getBytes();
        InetAddress address = InetAddress.getByName("224.0.1.0");

        DatagramPacket dp = new DatagramPacket(b,b.length,address,10000);
        ds.send(dp);

        ds.close();

    }
}
